package cn.edu.scau.cmi.wurihua.simpleFactory;

import cn.edu.scau.cmi.wurihua.factory.pojo.Beef;
import cn.edu.scau.cmi.wurihua.factory.pojo.Chicken;
import cn.edu.scau.cmi.wurihua.factory.pojo.Meat;
import cn.edu.scau.cmi.wurihua.factory.pojo.Pork;

public class SimpleFactory {
	public static Meat produceMeat(String kindOfMeat) {
		if(kindOfMeat.equals("pork")) {
			Meat pork = new Pork();
			return pork;
		}
		if(kindOfMeat.equals("beef")) {
			Meat beaf = new Beef();
			return beaf;
		}
		if(kindOfMeat.equals("chicken")) {
			Meat chicken = new Chicken();
			return chicken;
		}
		else {
			Meat meat = new Meat(kindOfMeat);
			return meat;
		}
			
	}
}
